import Vue from 'vue'
import Router from 'vue-router'

import notFound from 'components/common/404-page'


import Login from '@/components/login'
import Index from '@/components/index'

import syxslist from '@/components/common/syxslist'
import syxsinfo from '@/components/common/syxsinfo'
// import Home from '../components/home'

/*--接口页面--*/

/*--行政--*/
import ClassList from '../view/administrative/class/list'
import CourseList from '../view/administrative/course/list'
import Check from '../view/administrative/check/list'
import Holidays from '../view/administrative/holidays/holidays'
import TeacherManage from '../view/administrative/teacherManage/list'
import NumberManage from '../view/administrative/numberMange/list'
import TeacherCourse from '../view/administrative/teacherCourse/list'
import StudentManage from '../view/educa/studentManage/list'
import LskbManage from '../view/educa/lskbManage/list'
import JskbManage from '../view/educa/JskbManage/list'
//import Xsdr from '../view/educa/xsdr/list'
/*--报名缴费--*/
import Bjxx from '../view/educa/bjxx/list'
import Fxkc from '../view/educa/fxkc/list'
//新增缴费
// import Cost from '../view/cost/cost'
import Pay from '../view/cost/pay/list'

//学生信息
import StudentInfo from '../view/cost/student-info/list'

import payjl from '../view/cost/payjl/list'

//退学休学
import Txxx from '../view/cost/txxx/list'

//报名缴费
import baoming from '../view/cost/baoming/list'
import ddlb from '../view/cost/ddlb/list'

//费用结转
import PayFyjz from '../view/cost/pay-fyjz/list'

import Cwtj from '../view/cost/cwtj/list'
import Zf from '../view/cost/zf/list'
//缴费记录
import PayRecoreds from '../view/cost/pay-records/list'

//学生退费
import StudentFree from '../view/cost/student-free/list'
//缴费审核
import Jfsh from '../view/cost/jfsh/list'
import Zcfy from '../view/cost/zcfy/list'
import Fllist from '../view/cost/fllist/list'
// 退费记录
import FreeRecords from '../view/cost/free-records/list'

// 进销存管理
import Manage from '../view/manage/manage'
import Cksz from '../view/manage/cksz/list'
import Bs from '../view/manage/bs/list'
import Bx from '../view/manage/bx/list'
import Jh from '../view/manage/jh/jhlist'
import Cgrk from '../view/manage/cgrk/list'
import Cgth from '../view/manage/cgth/list'
import Jckcx from '../view/manage/jckcx/list'
import Kccx from '../view/manage/kccx/list'
import Pd from '../view/manage/pd/list'
import lytl from '../view/manage/lytl/list'
import lyck from '../view/manage/lyck/list'
import Wpsz from '../view/manage/wpsz/list'
import Kssz from '../view/manage/kssz/list'
import Xsxs from '../view/manage/xsxs/list'
import Wpfx from '../view/manage/wpfx/list'
import Xslyck from '../view/manage/xslyck/list'
//import Jxcgl from '../view/manage/jxcgl/list'
// 统计模块
import Statistics from '../view/statistics/statistics'
import xslstj from '../view/statistics/xslstj/list'

//营销模块
import Marketing from '../view/Marketing/Marketing'
import syzl from '../view/Marketing/syzl/list'
import zlk from '../view/Marketing/zlk/list'
import xwzl from '../view/Marketing/xwzl/list'
import xwzledit from '../view/Marketing/xwzledit/list'
import yymd from '../view/Marketing/yymd/list'
Vue.use(Router)

export default new Router({
	// mode: 'history',
	routes: [{
			path: '/',
			name: 'login',
			component: Login
		},
		{
			path: '*',
			name: 'not-found',
			component: notFound
		},
		{
			path: '/index',
			name: 'index',
			meta: {
				auth: true
			},
			component: Index,
			children: [
				{
					path: '/index',
					meta: {
						auth: true
					},
					redirect: '/home',
				},
				{
					path: '/home',
					name: 'home',
					component: (resolve) => {
						require(['../components/home'], resolve)
					}
				},
				{
					path: '/syxslist',
					name: 'syxslist',
					component: syxslist
				},
				{
					path: '/syxsinfo',
					name: 'syxsinfo',
					component: syxsinfo
				},
				// {
				//     path: '/authority',
				//     name: 'authority',
				//     component: (resolve) => {
				//         require(['../components/authority'], resolve)
				//     }
				// },

				{
					path: '/admin',
					name: 'admin',
					meta: {
						auth: true
					},
					component: (resolve) => {
						require(['../view/admin/admin'], resolve)
					},
					children: [{
							path: 'person',
							name: 'person',
							component: (resolve) => {
								require(['../view/admin/personManage/list'], resolve)
							},

						},

						{
							path: 'jiaoshi',
							name: 'jiaoshi',
							component: (resolve) => {
								require(['../view/admin/jiaoshiManage/list'], resolve)

							}
						},
						{
							path: 'xxjbsz',
							name: 'xxjbsz',
							component: (resolve) => {
								require(['../view/admin/xxjbszManage/list'], resolve)

							}
						},
						{
							path: 'zwqxsz',
							name: 'zwqxsz',
							component: (resolve) => {
								require(['../view/admin/zwqxsz/list'], resolve)

							}
						},
						{
							path: 'yushebj',
							name: 'yushebj',
							meta: {
								auth: true
							},
							component: (resolve) => {
								require(['../view/admin/yushebjManage/list'], resolve)
							},
						},

						{
							path: 'qingjia',
							name: 'qingjia',
							component: (resolve) => {
								require(['../view/admin/qingjiaManage/list'], resolve)

							}
						},
						{
							path: 'pingjia',
							name: 'pingjia',
							component: (resolve) => {
								require(['../view/admin/pingjiaManage/list'], resolve)

							}
						},
						{
							path: 'pingjiasend',
							name: 'pingjiasend',
							component: (resolve) => {
								require(['../view/admin/pingjiasendManage/list'], resolve)

							}
						},

						{
							path: 'bjjczy',
							name: 'bjjczy',
							component: (resolve) => {
								require(['../view/admin/bjjczyManage/list'], resolve)

							}
						},
						{
							path: 'xtcs',
							name: 'xtcs',
							component: (resolve) => {
								require(['../view/admin/xtcsManage/list'], resolve)

							}
						},
						{
							path: 'xtpz',
							name: 'xtpz',
							component: (resolve) => {
								require(['../view/admin/xtpzManage/list'], resolve)

							}
						},
						{
							path: 'infomode',
							name: 'infomode',
							component: (resolve) => {
								require(['../view/admin/infomodeManage/list'], resolve)

							}
						},
						{
							path: 'dbsx',
							name: 'dbsx',
							component: (resolve) => {
								require(['../view/admin/dbsxManage/list'], resolve)

							}
						},
						{
							path: 'jishi',
							name: 'jishi',
							component: (resolve) => {
								require(['../view/admin/jishiManage/list'], resolve)

							}
						},
						{
							path: 'holidays',
							name: 'holidays',
							component: (resolve) => {
								require(['../view/admin/holidaysManage/holidays'], resolve)

							}
						},
						{
							path: 'jjrtj',
							name: 'jjrtj',
							component: (resolve) => {
								require(['../view/admin/jjrtj/list'], resolve)
							}
						},
						{
							path: 'teacherjs',
							name: 'teacherjs',
							component: (resolve) => {
								require(['../view/admin/teacherjsManage/list'], resolve)

							}
						},
						{
							path: 'jishi',
							name: 'jishi',
							component: (resolve) => {
								require(['../view/admin/jishiManage/list'], resolve)

							}
						},
						{
							path: 'xx',
							name: 'xx',
							component: (resolve) => {
								require(['../view/admin/xxManage/list'], resolve)

							}
						},
						{
							path: 'bqy',
							name: 'bqy',
							component: (resolve) => {
								require(['../view/admin/bqyManage/list'], resolve)

							}
						},
						{
							path: 'xsda',
							name: 'xsda',
							component: (resolve) => {
								require(['../view/admin/xsda/list'], resolve)

							}
						},
						{
							path: 'xszx',
							name: 'xszx',
							component: (resolve) => {
								require(['../view/admin/xszxManage/list'], resolve)

							}
						},
						{
							path: 'jdgzsz',
							name: 'jdgzsz',
							component: (resolve) => {
								require(['../view/admin/jdgzsz/list'], resolve)

							}
						}
					]
				},
				{
					path: '/educa',
					name: 'educa',
					meta: {
						auth: true
					},
					component: (resolve) => {
						require(['../view/educa/educa'], resolve)
					},
					children: [{
							path: 'class',
							name: 'class',
							component: (resolve) => {
								require(['../view/educa/classManage/list'], resolve)
							},

						},
						{
							path: 'bjxx',
							name: 'bjxx',
							component: (resolve) => {
								require(['../view/educa/bjxx/list'], resolve)
							},

						},
						{
							path: 'xsxycj',
							name: 'xsxycj',
							component: (resolve) => {
								require(['../view/educa/xsxycjManage/list'], resolve)
							},

						},
						{
							path: 'fxkc',
							name: 'fxkc',
							component: (resolve) => {
								require(['../view/educa/fxkc/list'], resolve)
							},

						},
						{
							path: 'student',
							name: 'student',
							component: (resolve) => {
								require(['../view/educa/studentManage/list'], resolve)
							},

						},
						{
							path: 'xsdrexcelst',
							name: 'xsdrexcelst',
							component: (resolve) => {
								require(['../view/educa/xsdrexcelst/list'], resolve)
							},

						},
						{
							path: 'kscjtj',
							name: 'kscjtj',
							component: (resolve) => {
								require(['../view/educa/kscjtj/list'], resolve)
							},

						},
						{
							path: 'lskb',
							name: 'lskb',
							component: (resolve) => {
								require(['../view/educa/lskbManage/list'], resolve)
							},

						},
						{
							path: 'jskb',
							name: 'jskb',
							component: (resolve) => {
								require(['../view/educa/jskbManage/list'], resolve)
							},

						},
						{
							path: 'xstj',
							name: 'xstj',
							component: (resolve) => {
								require(['../view/educa/xstj/list'], resolve)
							},

						},
						{
							path: 'course',
							name: 'course',
							component: (resolve) => {
								require(['../view/educa/courseManage/list'], resolve)

							}
						},
						{
							path: 'check',
							name: 'check',
							component: (resolve) => {
								require(['../view/educa/check/list'], resolve)

							}
						},
						{
							path: 'teacher',
							name: 'teacher',
							component: (resolve) => {
								require(['../view/educa/teacherCourse/list'], resolve)

							}
						},
						{
							path: 'banji',
							name: 'banji',
							component: (resolve) => {
								require(['../view/educa/banjiCourse/list'], resolve)

							}
						},
						// {
						//     path: 'school',
						//     name: 'school',
						//     component: (resolve) => {
						//     require(['../view/educa/schoolCourse/list'], resolve)
						//
						//    }
						// },
						// {
						//     path: 'kaoshicj',
						//     name: 'kaoshicj',
						//     component: (resolve) => {
						//     require(['../view/educa/kaoshicjManage/list'], resolve)
						//
						//    }
						// },
						{
							path: 'kscj',
							name: 'kscj',
							component: (resolve) => {
								require(['../view/educa/kscj/list'], resolve)

							}
						},
						{
							path: 'lsbkap',
							name: 'lsbkap',
							component: (resolve) => {
								require(['../view/educa/lsbkap/list'], resolve)

							}
						},
						{
							path: 'bklist',
							name: 'bklist',
							component: (resolve) => {
								require(['../view/educa/bklist/list'], resolve)

							}
						},
						{
							path: 'workcj',
							name: 'workcj',
							component: (resolve) => {
								require(['../view/educa/workcjManage/list'], resolve)

							}
						},
						{
							path: 'msgbj',
							name: 'msgbj',
							component: (resolve) => {
								require(['../view/educa/msgbjManage/list'], resolve)

							}
						},
						{
							path: 'msg',
							name: 'msg',
							component: (resolve) => {
								require(['../view/educa/msgManage/list'], resolve)

							}
						},
						{
							path: 'tingshuozy',
							name: 'tingshuozy',
							component: (resolve) => {
								require(['../view/educa/tingshuozyCheck/list'], resolve)

							}
						},
						{
							path: 'fyfx',
							name: 'fyfx',
							component: (resolve) => {
								require(['../view/educa/fyfxManage/list'], resolve)

							}
						},
						{
							path: 'xsjtzy',
							name: 'xsjtzy',
							component: (resolve) => {
								require(['../view/educa/xsjtzyManage/list'], resolve)

							}
						},

						//                      {
						//                          path: 'courselist',
						//                          name: 'courselist',
						//                          component: CourseList
						//                      },
						//                      {
						//                          path: 'check',
						//                          name: 'check',
						//                          component: Check
						//                      },
						//                      {
						//                          path: 'holidays',
						//                          name: 'holidays',
						//                          component: Holidays
						//                      },
						//                      {
						//                          path: 'teacherManage',
						//                          name: 'teacherManage',
						//                          component: TeacherManage
						//                      },
						//                      {
						//                          path: 'numberManage',
						//                          name: 'numberManage',
						//                          component: NumberManage
						//                      },
						//                      {
						//                          path: 'teacherCourse',
						//                          name: 'teacherCourse',
						//                          component: TeacherCourse
						//                      }
					]
				},
				{
					path: '/cost',
					name: 'cost',
					meta: {
						auth: true
					},
					component: (resolve) => {
						require(['../view/cost/cost'], resolve)
					},
					children: [{
							path: 'pay',
							name: 'pay',
							component: Pay
						},
						{
							path: 'student-info',
							name: 'student-info',
							component: StudentInfo
						},
						{
							path: 'cwtj',
							name: 'cwtj',
							component: (resolve) => {
								require(['../view/cost/cwtj/list'], resolve)
							}
						},
						{
							path: 'kcsh',
							name: 'kcsh',
							component: (resolve) => {
								require(['../view/cost/kcsh/list'], resolve)
							}
						},
						{
							path: 'shouzhils',
							name: 'shouzhils',
							component: (resolve) => {
								require(['../view/cost/shouzhils/list'], resolve)
							}
						},
						{
							path: 'zcfy',
							name: 'zcfy',
							component: (resolve) => {
								require(['../view/cost/zcfy/list'], resolve)
							}
						},
						{
							path: 'cwflzc',
							name: 'cwflzc',
							component: (resolve) => {
								require(['../view/cost/cwflzc/list'], resolve)
							}
						},
						{
							path: 'zsr',
							name: 'zsr',
							component: (resolve) => {
								require(['../view/cost/zsr/list'], resolve)
							}
						},
						{
							path: 'fllist',
							name: 'fllist',
							component: (resolve) => {
								require(['../view/cost/fllist/list'], resolve)
							}
						},
						{
							path: 'zf',
							name: 'zf',
							component: (resolve) => {
								require(['../view/cost/zf/list'], resolve)
							}
						},
						{
							path: 'ddlb',
							name: 'ddlb',
							component: (resolve) => {
								require(['../view/cost/ddlb/list'], resolve)
							}
						},
						{
							path: 'xsbaoming',
							name: 'xsbaoming',
							component: (resolve) => {
								require(['../view/cost/xsbaoming/list'], resolve)
							}
						},
						{
							path: 'baoming',
							name: 'baoming',
							component: baoming
						},
						{
							path: 'payjl',
							name: 'payjl',
							component: payjl
						},
						{
							path: 'xstf',
							name: 'xstf',
							component: (resolve) => {
								require(['../view/cost/xstf/list'], resolve)
							}
						},
						{
							path: 'wptf',
							name: 'wptf',
							component: (resolve) => {
								require(['../view/cost/wptf/list'], resolve)
							}
						},
						{
							path: 'pay-records',
							name: 'pay-records',
							component: PayRecoreds
						},
						{
							path: 'pay-fyjz',
							name: 'pay-fyjz',
							component: PayFyjz
						},
						{
							path: 'txxx',
							name: 'txxx',
							component: Txxx
						},
						{
							path: 'student-free',
							name: 'student-free',
							component: StudentFree
						},
						{
							path: 'jfsh',
							name: 'jfsh',
							component: Jfsh
						},
						{
							path: 'free-records',
							name: 'free-records',
							component: FreeRecords
						}

					]
				},
				{
					path: '/manage',
					name: 'manage',
					meta: {
						auth: true
					},
					component: (resolve) => {
						require(['../view/manage/manage'], resolve)
					},
					component: Manage,
					children: [{
							path: 'cksz', //仓库管理
							name: 'cksz',
							component: Cksz
						},
						{
							path: 'bs', //报损管理
							name: 'bs',
							component: Bs
						},
						{
							path: 'bx', //报损管理
							name: 'bx',
							component: Bx
						},
						{
							path: 'jh', //报损管理
							name: 'jh',
							component: Jh
						},
						{
							path: 'wpsz', //物品分类管理
							name: 'wpsz',
							component: Wpsz
						},
						{
							path: 'wpfx', //物品管理
							name: 'wpfx',
							component: Wpfx
						},
						{
							path: 'pd', //物品管理
							name: 'pd',
							component: Pd
						},
						{
							path: 'cgrk',
							name: 'cgrk',
							component: Cgrk
						},
						{
							path: 'cgth',
							name: 'cgth',
							component: Cgth
						},
						{
							path: 'jckcx',
							name: 'jckcx',
							component: Jckcx
						},
						{
							path: 'kccx',
							name: 'kccx',
							component: Kccx
						},

						{
							path: 'lytl',
							name: 'lytl',
							component: lytl
						},
						{
							path: 'lyck',
							name: 'lyck',
							component: lyck
						},
						{
							path: 'kssz',
							name: 'kssz',
							component: Kssz
						},
						{
							path: 'xsxs',
							name: 'xsxs',
							component: Xsxs
						},
						{
							path: 'xslyck',
							name: 'xslyck',
							component: (resolve) => {
								require(['../view/manage/xslyck/list'], resolve)

							}

						},
						{
							path: 'jxcgl',
							name: 'jxcgl',
							component: (resolve) => {
								require(['../view/manage/jxcgl/list'], resolve)

							}

						},
						{
							path: 'gdjxcgl',
							name: 'gdjxcgl',
							component: (resolve) => {
								require(['../view/manage/gdjxcgl/list'], resolve)

							}

						},
						{
							path: 'bgypjxcgl',
							name: 'bgypjxcgl',
							component: (resolve) => {
								require(['../view/manage/bgypjxcgl/list'], resolve)

							}

						},
						{
							path: 'cfhb',
							name: 'cfhb',
							component: (resolve) => {
								require(['../view/manage/cfhb/list'], resolve)
							}
						}

					]
				},
				{
					path: '/statistics',
					name: 'statistics',
					meta: {
						auth: true
					},
					component: (resolve) => {
						require(['../view/statistics/statistics'], resolve)
					},
					children: [{
							path: 'xslstj', //学生流失统计
							name: 'xslstj',
							component: xslstj
						},
						{
							path: 'persontj',
							name: 'persontj',
							component: (resolve) => {
								require(['../view/statistics/persontj/list'], resolve)
							},

						},
						{
							path: 'kqtj',
							name: 'kqtj',
							component: (resolve) => {
								require(['../view/statistics/kqtj/list'], resolve)
							},

						},
						{
							path: 'fxzz',
							name: 'fxzz',
							component: (resolve) => {
								require(['../view/statistics/fxzz/list'], resolve)
							},

						},
						{
							path: 'srtj',
							name: 'srtj',
							component: (resolve) => {
								require(['../view/statistics/srtj/list'], resolve)
							},

						},
						{
							path: 'zctj',
							name: 'zctj',
							component: (resolve) => {
								require(['../view/statistics/zctj/list'], resolve)
							},

						},
						{
							path: 'cwrb',
							name: 'cwrb',
							component: (resolve) => {
								require(['../view/statistics/cwrb/list'], resolve)
							},

						},
						{
							path: 'zctj',
							name: 'zctj',
							component: (resolve) => {
								require(['../view/statistics/zctj/list'], resolve)
							},

						},

					]
				},
				{
					path: '/Marketing',
					name: 'Marketing',
					meta: {
						auth: true
					},
					component: (resolve) => {
						require(['../view/Marketing/Marketing'], resolve)
					},
					children: [{
							path: 'syzl', //学生流失统计
							name: 'syzl',
							component: syzl
						},
						{
							path: 'zlk', //学生流失统计
							name: 'zlk',
							component: zlk
						},
						{
							path: 'xwzl', //学生流失统计
							name: 'xwzl',
							component: xwzl
						},
						{
							path: 'xwzledit', //学生流失统计
							name: 'xwzledit',
							component: xwzledit
						},
						{
							path: 'yymd', //学生流失统计
							name: 'yymd',
							component: yymd
						},

					]
				},
				
			]
		}
	]
})